<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/WEB-INF/tld/orderStatus.tld" prefix="os" %>
<%@ taglib uri="/WEB-INF/tld/unicode_zh_code.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/core.tld" prefix="c"%>
<html>
<%@ include file="../common.jsp"%>
<script type="text/javascript" src="<%=basePath%>js/datePicker/WdatePicker.js" defer="defer"></script>
<script type="text/javascript" src="js/page.js"></script>
<script type="text/javascript" src="js/artDialog/artDialog.js?skin=idialog"></script>
<script type="text/javascript" defer="defer">
initPage(document.forms(0));
</script>
</head>
<script type="text/javascript" defer="defer">
JrCommit = function(ItId,Istatus){
	$.ajax({
		url:'Itinerary_doUpdate.shtml?',
		type:"post",
		data:{'ItId':ItId,'Istatus':Istatus},
        cache:false,
		success:function(data){
			location.reload();
		}	        
	});
};

JrCommit = function(){	
	$('form:first').submit();
};
</script>

<body>
	<form action="Itinerary_doSearch.shtml" method="post">
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			id="myTable">
			<tr>
				<td width="17" valign="top" background="images/mail_leftbg.gif"><img
					src="images/left-top-right.gif" width="17" height="29" /></td>
				<td valign="top" background="images/content-bg.gif">
					<div class="titlebt">行程单查询</div>
				</td>
				<td width="16" valign="top" background="images/mail_rightbg.gif"><img
					src="images/nav-right-bg.gif" width="16" height="29" /></td>
			</tr>
			<tr>
				<td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
				<td valign="top" bgcolor="#F7F8F9">
				<br/>
					<table border="0" cellpadding="0" cellspacing="0" width="100%" class="mytable">
						<tr height="30">
							<td class="left_top">启始时间:<input id="start"
								readonly="readonly" class="Wdate" value="${item.startTime}"
								name="item.startTime" type="text"
								onclick="WdatePicker({max:'%y-%M-%d'})" /> &nbsp;结束时间：<input
								id="end" readonly="readonly" class="Wdate"
								value="${item.endTime}" name="item.endTime" type="text"
								onclick="WdatePicker({max:'%y-%M-%d'})" />&nbsp; 订单状态：<input
								id="status" type="text" value="${item.statusDesc}"
								name="item.statusDesc" align="middle" /></td>
							<td class="border-top"><button type="button" class="Submit"
									style="border: 1px gray soild;" onclick='JrCommit()'>确认</button>
								&nbsp;
								<button type="button" class="Submit"
									onClick="clearAll(this.form)" style="border: 1px gray soild;">清空</button>
							</td>
						</tr>
					</table>
					</td>
				<td background="images/mail_rightbg.gif">&nbsp;</td>
			</tr>
			<tr>
				<td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
				<td valign="top" bgcolor="#F7F8F9">
					<TABLE height="auto" border=0 class="mytable" cellPadding=0
						cellSpacing=0>
						<TBODY>
							<TR>
								<TD height="5" colspan="16"></TD>
							</TR>
							<TR>
								<TH class="left">收件人</TH>
								<TH>详细地址</TH>
								<TH>邮编</TH>
								<TH>联系电话</TH>
								<TH>订单号</TH>
								<TH>行程单号</TH>
								<TH>创建时间</TH>
								<TH>订单状态</TH>
								<th>&nbsp;</th>
								<th width="7%">&nbsp;</th>
							</TR>
							<s:if test="vo.itinerarys!=null && vo.itinerarys.size()>0">
							<s:iterator value="vo.itinerarys" id="itineraryNo" var="lst">
								<TR>
									<td style="display: none" id="It_${lst.id}"><input
										name="ItId" value="${lst.id}" /></td>
									<td class="left">${lst.name==null?"NULL":lst.name}</td>
									<td>
									${lst.province==lst.city?'':lst.province}${lst.city}
									${lst.address==null?"NULL":lst.address}</td>
									<td>${lst.zip==null?"NULL":lst.zip}</td>
									<td>${lst.phone==null?"NULL":lst.phone}</td>
									<td>${lst.orderNo==null?"NULL":lst.orderNo}</td>
									<td>${lst.itineraryNo==null?"NULL":lst.itineraryNo}</td>
									<td><s:date name="creatTime" format="yyyy年MM月dd日 HH:mm" />
									</td>
									<td style="margin: 0px; padding: 0px;">
									<s:if test="file1==null">
										<os:travelState state="${lst.status}"/>
									</s:if>
									<s:else>
										<s:if test="file1!=null && file2==2">
											<os:travelState state="${lst.status}"/>
										</s:if>
										<s:else>
											<font style="color:red">用户未付款</font>
										</s:else>
									</s:else>
									<input
										id="MyInput_${lst.id}" align="middle" type="hidden"
										value='${lst.status==null?"NULL":lst.status}'
										style="border: none; width: '20px'; background: none; margin: 0px 0px 0px 20px; padding: 0px;">
									</td>
									<td>
									<s:if test="file1!=null">后补行程单</s:if>
									<s:else>--</s:else>
									</td>
									<td><a href="javascript:void(0)" id="MyA_${lst.id}"
										class="left_txt3" style="cursor: hand;"
										onclick='JrCommit( "update",${lst.id},$("#MyInput_${lst.id}").attr("value"));return false'>确认</a>
									</td>
								</TR>
							</s:iterator>
			<tr>
				<td class="left" colspan="10" align="right"
					style="background: #FAFBFC repeat-x; height: 28">
					${vo.pageBean.pageToolsMenu}</td>
			</tr></s:if>
			<s:else>
					<tr><td class="left" colspan="10" align="center"
							style="background: #FAFBFC repeat-x; height: 28">
							未搜索到符合条件的信息……</td>
				</tr></s:else>
		</TBODY>
	</TABLE>
			</td>
			<td background="images/mail_rightbg.gif">&nbsp;</td>
		</tr>
		
		<tr>
			<td valign="bottom" background="images/mail_leftbg.gif"><img
				src="images/buttom_left2.gif" width="17" height="17" /></td>
			<td background="images/buttom_bgs.gif"><img
				src="images/buttom_bgs.gif" width="17" height="17"></td>
			<td valign="bottom" background="images/mail_rightbg.gif"><img
				src="images/buttom_right2.gif" width="16" height="17" /></td>
		</tr>
	</table>
	</form>
</body>
</html>